package com.lzx.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lzx.common.utils.R;
import com.lzx.user.entity.SysUser;
import com.lzx.user.entity.vo.SearchParams;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author lzx
 * @since 2022-11-22
 */
public interface SysUserService extends IService<SysUser> {

    //后台登录
    R login(SysUser sysUser, HttpServletRequest request);

    //获取所有用户
    R getSysUserList(int current, int size);

    //新增用户
    R addSysUser(SysUser sysUser);

    //修改用户信息
    R updateSysUser(SysUser sysUser);

    //禁用用户
    R deleteSysUser(List<Long> ids);

    //解禁用户
    R relieveSysUser(Long id);

    //根据id获取用户信息
    R getSysUser(Long id);

    //搜索
    R searchSysUser(SearchParams searchParams);

    //根据token获取个人信息
    R getSysUserInfo(HttpServletRequest request);

    //导出
    void exportSysUser(HttpServletResponse response);
}
